import https from "../../https";
 //数据类型
export type ScheduleDetail = {
 detailId: string,
 scheduleId: string,
 doctorId: string,
 times: string,
 week: string,
 witchWeek: string,
 type: string,
 amount: number,
 lastAmount:number,
 doctorName: string
 }
 //列表查询参数
export type ScheduleDetailPageParm = {
 currentPage:number,
 pageSize:number,
 total:number
 }
 //下拉数据类型
export type SelectType = {
 label:string;
 value:number;
 }
 //数据类型
export type Schedule = {
 scheduleId: string,
 doctorId: string,
 doctorName: string,
 departmentName: string,
 weekOneM: number,
 weekTwoM: number,
 weekThreeM: number,
 weekFourM: number,
 weekFiveM: number,
 weekSixM: number,
 weekZeroM: number,
 weekOne: string,
weekTwo: string,
 weekThree: string,
 weekFour: string,
 weekFive: string,
 weekSix: string,
 weekZero: string,
 week: string,
 details:ScheduleDetail[]
 }
 //列表查询参数
export type SchedulePageParm = {
 currentPage:number,
 pageSize:number,
 total?:number,
 doctorName:string,
 }
//  //查询本周日期
// export const getCurrentWeekApi = () => {
//  return https.get("/api/schedule/getCurrentWeek")
//  }
//  //查询下周日期
// export const getNextWeekApi = () => {
//  return https.get("/api/schedule/getNextWeek")
//  }
 //排班保存
export const scheduleAddApi = (parm:any) => {
 return https.post("/api/scheduleDetail/add",parm)
 }
 //排班编辑
export const scheduleEditApi = (parm:any) => {
   return https.put("/api/scheduleDetail/edit",parm)
}
//  //排班列表
// export const geListApi = (parm:SchedulePageParm) => {
//  return https.get("/api/scheduleDetail/getList",parm)
//  }
 //批量删除排班
export const delListApi = (parm:any) => {
 return https.post("/api/scheduleDetail/delList",parm)
 }
 //排班删除
export const scheduleDeleteApi = (scheduledetailId:string) => {
   return https.delete(`/api/scheduleDetail/${scheduledetailId}`)
}
   //查询列表
export const getListApi = (parm:SchedulePageParm)=>{
      return https.get("/api/scheduleDetail/getList",parm)}